<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">


  <link rel="apple-touch-icon" sizes="180x180" href="/page/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/page/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/page/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/page/images/logo.svg" color="#222">

<link rel="stylesheet" href="/page/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css" integrity="sha256-mUZM63G8m73Mcidfrv5E+Y61y7a12O5mW4ezU3bxqW4=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"assd12138.gitee.io","root":"/page/","images":"/page/images","scheme":"Gemini","darkmode":false,"version":"8.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":false,"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/page/search.json","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/page/js/config.js"></script>
<meta name="description" content="记录202107KMMS认定">
<meta property="og:type" content="article">
<meta property="og:title" content="202107KMMS认定记录">
<meta property="og:url" content="https://assd12138.gitee.io/page/2021/08/03/202107KMMS%E8%AE%A4%E5%AE%9A%E8%AE%B0%E5%BD%95/index.html">
<meta property="og:site_name" content="爱爱爱呵风他">
<meta property="og:description" content="记录202107KMMS认定">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/assd12138/cdnpics/raw/master/img/image-20210815211715528.png">
<meta property="og:image" content="https://gitee.com/assd12138/cdnpics/raw/master/img/20210815213854.png">
<meta property="article:published_time" content="2021-08-03T09:47:37.000Z">
<meta property="article:modified_time" content="2022-05-09T03:18:13.061Z">
<meta property="article:author" content="爱爱爱呵风他">
<meta property="article:tag" content="笔试题">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://gitee.com/assd12138/cdnpics/raw/master/img/image-20210815211715528.png">


<link rel="canonical" href="https://assd12138.gitee.io/page/2021/08/03/202107KMMS%E8%AE%A4%E5%AE%9A%E8%AE%B0%E5%BD%95/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://assd12138.gitee.io/page/2021/08/03/202107KMMS%E8%AE%A4%E5%AE%9A%E8%AE%B0%E5%BD%95/","path":"2021/08/03/202107KMMS认定记录/","title":"202107KMMS认定记录"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>202107KMMS认定记录 | 爱爱爱呵风他</title>
  




  <noscript>
    <link rel="stylesheet" href="/page/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/page/" class="brand" rel="start">
      <i class="logo-line"></i>
      <h1 class="site-title">爱爱爱呵风他</h1>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu">
        <li class="menu-item menu-item-home"><a href="/page/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li>
        <li class="menu-item menu-item-tags"><a href="/page/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li>
        <li class="menu-item menu-item-archives"><a href="/page/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E8%AE%A4%E5%AE%9A%E5%86%85%E5%AE%B9%E4%B8%8E%E8%A6%81%E6%B1%82"><span class="nav-number">1.</span> <span class="nav-text">认定内容与要求</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Ajax-json"><span class="nav-number">2.</span> <span class="nav-text">Ajax&#x2F;json</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ES6%E5%88%9D%E7%BA%A7"><span class="nav-number">3.</span> <span class="nav-text">ES6初级</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%89%8D%E7%AB%AF%E8%B0%83%E8%AF%95"><span class="nav-number">4.</span> <span class="nav-text">前端调试</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BC%96%E7%A0%81%E5%B7%A5%E5%85%B7"><span class="nav-number">5.</span> <span class="nav-text">编码工具</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#html%E5%88%9D%E7%BA%A7"><span class="nav-number">6.</span> <span class="nav-text">html初级</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#CSS%E5%88%9D%E7%BA%A7"><span class="nav-number">7.</span> <span class="nav-text">CSS初级</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#js%E5%88%9D%E7%BA%A7"><span class="nav-number">8.</span> <span class="nav-text">js初级</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%BB%93%E6%9D%9F"><span class="nav-number">9.</span> <span class="nav-text">结束</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="爱爱爱呵风他"
      src="https://s1.ax1x.com/2020/08/26/dWnF58.jpg">
  <p class="site-author-name" itemprop="name">爱爱爱呵风他</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/page/archives/">
          <span class="site-state-item-count">24</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/page/tags/">
        <span class="site-state-item-count">11</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="cc-license site-overview-item animated" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/zh-cn" class="cc-opacity" rel="noopener" target="_blank"><img src="https://cdn.jsdelivr.net/npm/@creativecommons/vocabulary@2020.11.3/assets/license_badges/small/by_nc_sa.svg" alt="Creative Commons"></a>
  </div>



        </div>
      </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://assd12138.gitee.io/page/2021/08/03/202107KMMS%E8%AE%A4%E5%AE%9A%E8%AE%B0%E5%BD%95/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="https://s1.ax1x.com/2020/08/26/dWnF58.jpg">
      <meta itemprop="name" content="爱爱爱呵风他">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="爱爱爱呵风他">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          202107KMMS认定记录
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2021-08-03 17:47:37" itemprop="dateCreated datePublished" datetime="2021-08-03T17:47:37+08:00">2021-08-03</time>
    </span>
      <span class="post-meta-item">
        <span class="post-meta-item-icon">
          <i class="far fa-calendar-check"></i>
        </span>
        <span class="post-meta-item-text">更新于</span>
        <time title="修改时间：2022-05-09 11:18:13" itemprop="dateModified" datetime="2022-05-09T11:18:13+08:00">2022-05-09</time>
      </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p>记录202107KMMS认定</p>
<span id="more"></span>

<h2 id="认定内容与要求"><a href="#认定内容与要求" class="headerlink" title="认定内容与要求"></a>认定内容与要求</h2><table>
<thead>
<tr>
<th>认定内容</th>
<th>认定要求</th>
</tr>
</thead>
<tbody><tr>
<td>Ajax/json</td>
<td>1.了解基本的原理，会用jsonp方式跨域<br />2.会使用ajax编写程序<br />3.知道json的数据结构，会使用Json组织数据</td>
</tr>
<tr>
<td>ES6初级</td>
<td>1.掌握let和const命令<br/>2.了解变量的解构赋值，掌握常规使用<br/>3.了解字符串的扩展，掌握常规使用<br/>4.了解掌握数值，数组，函数，对象的扩展<br/>5.掌握Promise，Module对象</td>
</tr>
<tr>
<td>前端调试</td>
<td>熟练使用各种调试工具，进行css调试，js排错优化。如：firebug，developer tool</td>
</tr>
<tr>
<td>编码工具</td>
<td>Vscode的使用，配置等</td>
</tr>
<tr>
<td>html初级</td>
<td>1.基本语法、标签、声明、属性<br/>2.标签属于什么元素，内联/内联-块级/块级元素</td>
</tr>
<tr>
<td>css初级</td>
<td>1.熟悉css基本语法，以及css工作原理<br/>2.熟练使用css selector 常规选择器class，id,元素，后代，通用，了解选择器的优先级<br/>3.熟悉浮动，定位，盒模型，背景，字体，颜色等常用属性，能运用css进行页面布局和展现效果图</td>
</tr>
<tr>
<td>js初级</td>
<td>1.熟悉js基本语法，以及js工作原理<br/>2.了解js的基本数据类型,js操作符，语句，变量<br/>3.能进行基础的DOM操作（增删改查）和BOM操作<br/>4.能通过一些事件进行简单的页面交互，例如，点击，双击，鼠标划过等等</td>
</tr>
<tr>
<td>需求分析初级</td>
<td>1.需求整体确定的流程<br />2.5W1H工作法的内容<br />3.偏后端的结构化分析方法和面向对象分析方法</td>
</tr>
<tr>
<td>原型初级</td>
<td>能够了解并使用一些Axure中的功能</td>
</tr>
</tbody></table>
<h2 id="Ajax-json"><a href="#Ajax-json" class="headerlink" title="Ajax/json"></a>Ajax/json</h2><ul>
<li><p>Ajax原生请求的书写的步骤</p>
</li>
<li><p>跨域，怎样算是跨域</p>
<p>同源的定义是两个URL的protocal,host,port相同，则两个URL属于同源，在考虑port的时候如果没有显式填写port，会按协议默认的port考虑，例如<code>http:127.0.0.1:80</code>和<code>http:127.0.0.1/test</code>同源，<code>https:127.0.0.1:81</code>和<code>https:127.0.0.1</code>同源。而host是不会把域名先解析成ip判断的，例如localhost和127.0.0.1不同源。</p>
</li>
<li><p>jsonp是怎么个用法</p>
<p>利用网页实时插入运行的脚本调用函数来实现跨域的api</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">jsonp</span>(<span class="params">url</span>)&#123;</span><br><span class="line">    <span class="keyword">let</span> script = <span class="variable language_">document</span>.<span class="title function_">createElement</span>(<span class="string">&#x27;script&#x27;</span>);</span><br><span class="line">    script.<span class="property">src</span> = url;</span><br><span class="line">    <span class="variable language_">document</span>.<span class="property">body</span>.<span class="title function_">appendChild</span>(script);</span><br><span class="line">&#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">handle</span>(<span class="params">data</span>)&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(data);</span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// 百度候选词api</span></span><br><span class="line"><span class="keyword">let</span> qustion = <span class="string">&#x27;Chi&#x27;</span>;</span><br><span class="line"><span class="comment">// jsonp的api的链接都会有一个参数叫cb或者callback的，放在后面时会原封不动作为调用的函数名</span></span><br><span class="line"><span class="keyword">let</span> cb = <span class="string">&#x27;handle&#x27;</span>;</span><br><span class="line"><span class="title function_">jsonp</span>(<span class="string">`https://www.baidu.com/sugrec?pre=1&amp;p=3&amp;ie=utf-8&amp;json=1&amp;prod=pc&amp;from=pc_web&amp;wd=<span class="subst">$&#123;qustion&#125;</span>&amp;req=2&amp;csor=5&amp;pwd=script&amp;cb=<span class="subst">$&#123;cb&#125;</span>`</span>);</span><br></pre></td></tr></table></figure></li>
<li><p>json中，哪些不能从JavaScript Object转换为JavaScript Object Notation</p>
<ul>
<li>包含循环引用和BigInt会异常</li>
<li>方法、undefined和Symbol分两种情况，直接出现在对象键值对作为值的被忽略，出现在数组中的用null作为占位符</li>
</ul>
</li>
</ul>
<h2 id="ES6初级"><a href="#ES6初级" class="headerlink" title="ES6初级"></a>ES6初级</h2><ul>
<li><p>解构赋值是怎样使用的，解构赋值的默认值和ES6的函数默认值混用时的区别</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    <span class="attr">p</span>:[<span class="string">&#x27;a&#x27;</span>,&#123;<span class="attr">y</span>:<span class="string">&#x27;b&#x27;</span>&#125;]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>从以上字面量中取出字符串a和字符串b，并取出p（左边是模式，右边是接收赋值的变量标识符，简写p&lt;=&gt;p:p）</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> &#123;<span class="attr">p</span>:[paramsA,&#123;<span class="attr">y</span>:paramsB&#125;],p&#125;=&#123;</span><br><span class="line">    <span class="attr">p</span>:[<span class="string">&#x27;a&#x27;</span>,&#123;<span class="attr">y</span>:<span class="string">&#x27;b&#x27;</span>&#125;]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>默认值的区别例子</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">function</span> <span class="title function_">f</span>(<span class="params">&#123;x=<span class="number">0</span>,y=<span class="number">0</span>&#125;=&#123;&#125;</span>)&#123; <span class="variable language_">console</span>.<span class="title function_">log</span>(x,y) &#125;</span><br><span class="line"><span class="keyword">function</span> <span class="title function_">f2</span>(<span class="params">&#123;x,y&#125;=&#123;x:<span class="number">0</span>,y:<span class="number">0</span>&#125;</span>)&#123; <span class="variable language_">console</span>.<span class="title function_">log</span>(x,y) &#125;</span><br></pre></td></tr></table></figure>

<p>其区别的产生在于如果收到了任意第一个参数，那么右侧的函数默认值立刻会被弃用，而左侧的解构赋值的默认值仅在解构成功时会被弃用，例如传入参数为一个数字1，那么f中仍然有x=0,y=0;f2中x和y均为undefined</p>
</li>
<li><p>字符串的拓展有哪些</p>
<ol>
<li>最常用的字符串模板</li>
<li>字符串也可以使用for-of迭代</li>
<li>不常用的对于unicode字符的支持</li>
</ol>
</li>
<li><p>数值的拓展有哪些</p>
<ol>
<li>新的判断方法isFinite、isNaN</li>
<li>对于进制的支持</li>
</ol>
</li>
<li><p>函数的拓展有哪些</p>
<ol>
<li>函数的默认值的使用方式</li>
<li>使用…进行剩余参数收集，Rest参数必须是最后一个参数，否则定义时会报语法错误，如果没收集到参数，一般的值会是undefined，而Rest参数会是空数组</li>
<li>函数的length属性，该属性指明了无默认值的函数参数的个数</li>
</ol>
</li>
<li><p>对象的拓展有哪些</p>
<p>方法和属性都可以使用简写方式</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> a = <span class="number">1</span></span><br><span class="line"><span class="keyword">let</span> exam = &#123;</span><br><span class="line">    a,<span class="comment">// 与外部同名的成员不必再写成a:a</span></span><br><span class="line">    <span class="title function_">foo</span>(<span class="params"></span>)&#123;<span class="comment">// 函数不必再写成 foo:function()&#123;&#125;</span></span><br><span class="line">        <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="number">123</span>)</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>变量做key</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> s1 = <span class="string">&#x27;m&#x27;</span></span><br><span class="line"><span class="keyword">let</span> s2 = <span class="string">&#x27;n&#x27;</span></span><br><span class="line"><span class="keyword">let</span> obj = &#123;</span><br><span class="line">    [s1+s2] : <span class="number">1234</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// obj.mn</span></span><br></pre></td></tr></table></figure>

<p>对象的descriptor（比较复杂，主要是对象各成员属性的一些元属性）</p>
</li>
<li><p>数组的拓展有哪些</p>
<p>拓展运算符，类数组转为数组的方法<code>Array.from</code>,比较常用的<code>Array.includes</code>以及<code>keys()</code>、<code>entries()</code>和<code>values()</code>三个遍历方法</p>
</li>
<li><p>如何使用fill填充一个数组，使其成为一个有100个1的数组<br>这个方法是数组实例的一个方法，将数组实例现有的所有元素包括空位全部填充为其第一个参数，第二和第三个参数为起始和结束的前一个,param2 &lt;= index &lt; param3的值全部会被填充。因此上面的题目的答案应该为</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> arr = <span class="keyword">new</span> <span class="title class_">Array</span>(<span class="number">100</span>).<span class="title function_">fill</span>(<span class="number">1</span>)</span><br></pre></td></tr></table></figure></li>
<li><p>ES6 Module怎么引入模块（一般的导出接口和导出默认接口）</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 导出</span></span><br><span class="line"><span class="keyword">let</span> a = <span class="number">1</span>,b = <span class="number">2</span></span><br><span class="line"><span class="keyword">export</span> &#123;a,b&#125; <span class="comment">// 必须按接口导出</span></span><br><span class="line"><span class="keyword">export</span> <span class="keyword">default</span> a <span class="comment">// default可以不需要，因为default自己就是一个接口</span></span><br><span class="line"><span class="keyword">export</span> &#123;a <span class="keyword">as</span> otherA,b <span class="keyword">as</span> otherB&#125;<span class="comment">// 重命名</span></span><br></pre></td></tr></table></figure>

<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 导入</span></span><br><span class="line"><span class="keyword">import</span> &#123;a,b&#125; <span class="keyword">from</span> <span class="string">&#x27;./m&#x27;</span></span><br><span class="line"><span class="keyword">import</span> &#123;otherA <span class="keyword">as</span> aaa,otherB <span class="keyword">as</span> bbb&#125; <span class="keyword">from</span> <span class="string">&#x27;./m&#x27;</span></span><br><span class="line"><span class="keyword">import</span> f <span class="keyword">from</span> <span class="string">&#x27;./m&#x27;</span></span><br><span class="line"><span class="keyword">import</span> &#123;<span class="keyword">default</span> <span class="keyword">as</span> f&#125; <span class="keyword">from</span> <span class="string">&#x27;./m&#x27;</span></span><br></pre></td></tr></table></figure></li>
<li><p>ES6 Module是否有缓存</p>
<p>有缓存，在原模块中的修改会在引入的模块中实时表现</p>
</li>
<li><p>能否动态引入<br>为了进行静态分析，提高效率，所以无法动态导入导出</p>
<p>可以使用import()进行动态的导入导出</p>
</li>
<li><p>Promise有哪些静态方法</p>
<p><code>Promise.all</code>全部fulfilled后才会把返回的的Promise实例变为fulfilled，把产物变为数组传给onfulfilled；如果有一个reject了，返回的实例就rejected,只把对应的reject的那个数据给到.catch</p>
<p><code>Promise.allSettled</code>传入的promise都尘埃落定后，返回所有的promise的状态和值如{status:’fulfilled’,value:123}</p>
<p><code>Promise.any</code>和<code>Promise.all</code>相反，成功一个就立刻返回，只返回成功的那个值</p>
<p><code>Promise.race</code>和<code>Promise.any</code>意思相近，不过是尘埃落定一个就立刻返回，只返回尘埃落定的那个状态的值</p>
</li>
<li><p>Promise的链条</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">let</span> p = <span class="keyword">new</span> <span class="title class_">Promise</span>(<span class="function">(<span class="params">resolve,reject</span>)=&gt;</span>&#123;</span><br><span class="line">    <span class="title function_">reject</span>(<span class="number">123</span>)</span><br><span class="line">&#125;)</span><br><span class="line">p.<span class="title function_">then</span>(<span class="function"><span class="params">value</span>=&gt;</span>&#123;</span><br><span class="line">    <span class="keyword">return</span> value</span><br><span class="line">&#125;,<span class="function"><span class="params">e</span>=&gt;</span>&#123;</span><br><span class="line">    <span class="keyword">return</span> e</span><br><span class="line">&#125;).<span class="title function_">then</span>(<span class="function"><span class="params">value</span>=&gt;</span>&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;success&#x27;</span>,value)</span><br><span class="line">&#125;,<span class="function"><span class="params">e</span>=&gt;</span>&#123;</span><br><span class="line">    <span class="variable language_">console</span>.<span class="title function_">log</span>(<span class="string">&#x27;fail&#x27;</span>,e)</span><br><span class="line">&#125;)</span><br></pre></td></tr></table></figure>

<p>上面这个打印的是success 123还是fail 123</p>
<p>是success 123，后续的.then链的return会将其包装为onfulfilled的状态的Promise</p>
</li>
</ul>
<h2 id="前端调试"><a href="#前端调试" class="headerlink" title="前端调试"></a>前端调试</h2><ul>
<li><p>dev tool如何为页面中的元素增加悬浮等状态</p>
<p>在右边的CSS的工具中的:hov中添加元素状态即可</p>
</li>
<li><p>使用js调试器打条件式断点，查看堆栈，watch<br>在源中使用ctrl+p搜索源文件，右击某一行打条件式断点，右侧可以查看暂停时的调用堆栈、添加监视表达式</p>
</li>
<li><p>性能调试工具的使用方法</p>
<ol>
<li>使用隐私模式打开页面避免插件的干扰</li>
<li>性能面板上使用Network和CPU模拟坏网络环境和移动设备算力不足时的性能表现</li>
<li>查看FPS每秒帧数，如果是红色表明帧数过低</li>
<li>选中一段范围，CPU中的颜色对应下方摘要的颜色范围，不同的颜色代表在某段时间CPU主要在进行何种工作（脚本、绘制、绘画、系统、空闲），如果CPU始终处于高占用，需要根据某一段时间占用CPU较多的部分进行优化</li>
<li>打开屏幕截图功能、悬浮于选择视图之上时可以查看在每一个时间点、网页的截图状态</li>
<li>在“帧”视图中可以查看具体每一段时间（按色块）的平均帧数，以及这段时间的截图</li>
<li>帧下面的体验会表示此段时间用户体验不好</li>
<li>在“更多工具”中可以打开“Rendering（绘制）”工具，在页面上添加一些渲染变化的指示框，以及展示实时的帧数表现。</li>
</ol>
</li>
</ul>
<h2 id="编码工具"><a href="#编码工具" class="headerlink" title="编码工具"></a>编码工具</h2><ul>
<li>VScode的使用，了解一下debugger for Chrome</li>
</ul>
<h2 id="html初级"><a href="#html初级" class="headerlink" title="html初级"></a>html初级</h2><ul>
<li><p>html的基础语法是怎样构建一个.html的网页文件的</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;./css/index.css&quot;</span> /&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>网页标题<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            www</span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;./js/index.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
<li><p>常见的内联和块级元素标签</p>
<p>内联：span、strong、i、em</p>
<p>块级元素：h1-h6、article、div、p、section</p>
</li>
<li><p>一个html中为什么CSS放前面，js放后面</p>
<p>CSS放在前面可以使浏览器在加载DOM树之前先加载好CSSOM树、而js放在后面首先可以使得页面先呈现在用户面前、其次可以保证js的操作能够获取到DOM的元素。</p>
</li>
</ul>
<h2 id="CSS初级"><a href="#CSS初级" class="headerlink" title="CSS初级"></a>CSS初级</h2><ul>
<li><p>基本语法是怎样的</p>
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">选择器&#123;</span><br><span class="line">	属性：属性值</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></li>
<li><p>CSS的工作原理</p>
<ol>
<li>HTML的加载</li>
</ol>
<p>　　HTML是一个网页的基础，下载完成后解析</p>
<ol start="2">
<li>其他静态资源加载</li>
</ol>
<p>　　解析HTML时，发现其中有其他外部资源链接比如CSS、JS、图片等，会立即启用别的线程下载。</p>
<p>　　但当外部资源是JS时，HTML的解析会停下来，等JS下载完执行结束后才继续解析HTML，防止JS修改已经完成的解析结果</p>
<ol start="3">
<li>DOM树构建</li>
</ol>
<p>　　在HTML解析的同时，解析器会把解析完成的结果转换成DOM对象，再进一步构建DOM树</p>
<ol start="4">
<li>CSSOM树构建</li>
</ol>
<p>　　CSS下载完之后对CSS进行解析，解析成CSS对象，然后把CSS对象组装起来，构建CSSOM树</p>
<ol start="5">
<li>渲染树构建</li>
</ol>
<p>　　当DOM树和CSSOM树都构建完之后，浏览器根据这两个树构建一棵渲染树</p>
<ol start="6">
<li>布局计算</li>
</ol>
<p>　　渲染树构建完成以后，浏览器计算所有元素大小和绝对位置</p>
<ol start="7">
<li>渲染</li>
</ol>
<p>　　布局计算完成后，浏览器在页面渲染元素。经过渲染引擎处理后，整个页面就显示出来</p>
</li>
<li><p>原生的写法中是怎样添加一个CSS文件到html文件中的</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;./css/index.css&quot;</span> /&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br></pre></td></tr></table></figure></li>
<li><p>有哪些常用的选择器</p>
<ol>
<li>标签选择器、类选择器、id选择器</li>
<li>属性选择器</li>
<li>伪类和伪元素选择器</li>
<li>关系选择器</li>
</ol>
</li>
<li><p>选择器优先级的</p>
<p><strong>!important &gt; 行内样式&gt;ID选择器 &gt; 类选择器 &gt; 标签 &gt; 通配符和关系符 &gt; 继承 &gt; 浏览器默认属性</strong></p>
<p>优先级相同，后面的规则会覆盖前面规则</p>
</li>
<li><p>现代浏览器的标准盒模型和IE浏览器的怪异盒模型之间的区别<br>标准盒模型的宽高是直接设置到content-box之上的<br>当设置<code>box-sizing:border-box</code>，宽高就设置到了border那一层，boder+padding+content的宽高才等于width或height</p>
</li>
<li><p>一个元素是块级还是内联元素的定义为何</p>
<ol>
<li>内联元素只能包含内联元素，块级元素可以包含块级元素和内联元素</li>
<li>块级元素独占一行，内联元素可以并排</li>
</ol>
</li>
<li><p>元素有哪些定位方式，是怎么定位的</p>
</li>
<li><p>static：默认值，静态定位</p>
<ul>
<li>relative：相对定位，此时设定top。。四方值可以使元素相对其静态定位的位置进行移动，但是，元素的静态定位的位置占位不会收到影响，而元素的移动也不会影响其他位置的布局。</li>
<li>absolute：绝对定位，相对于绝对定位的包含块进行定位，其包含块为它的最近的 position 的值不是 <code>static</code> （也就是值为<code>fixed</code>, <code>absolute</code>, <code>relative</code> 或 <code>sticky</code>）的祖先元素，如果其祖先都是<code>static</code>，那么相对于初始块（html也被包含在这个初始块中）定位。</li>
<li>fixed：固定定位，相对于浏览器的视口进行定位。</li>
</ul>
</li>
<li><p>background这个属性是如何使用的</p>
</li>
</ul>
<h2 id="js初级"><a href="#js初级" class="headerlink" title="js初级"></a>js初级</h2><ul>
<li><p>基础数据类型有哪些<br>三值(Boolean、String、Number)两空(Null、undefined)一对象(Object)</p>
</li>
<li><p>DOM的增删改查的方法</p>
<ol>
<li><p>增</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">father.<span class="title function_">appendChild</span>(son) <span class="comment">// 插入到father的最后一个子节点</span></span><br><span class="line"><span class="variable language_">document</span>.<span class="title function_">insertBefore</span>(relativeNode,newNode) <span class="comment">// 将某节点插入到相对节点的前面</span></span><br><span class="line"><span class="comment">// 如果appendChild和insertBefore的对象是已存在document中的内容的引用，其效果就是移动</span></span><br></pre></td></tr></table></figure></li>
<li><p>查</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">querySelector</span><br><span class="line">querySelectorAll <span class="comment">// NodeList静态集合</span></span><br><span class="line"></span><br><span class="line">getElementById</span><br><span class="line"></span><br><span class="line">getElementsByClassName<span class="comment">// HTMLCollection，会根据DOM动态变化</span></span><br><span class="line">getElementsByName</span><br></pre></td></tr></table></figure></li>
<li><p>改</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">innerHTML<span class="comment">//直接修改一个元素的内部的html字符串</span></span><br><span class="line">innerText<span class="comment">//直接修改一个元素的内部的文本节点字符串</span></span><br></pre></td></tr></table></figure></li>
<li><p>删除</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">parentNode.<span class="title function_">removeChild</span>(son) <span class="comment">// 调用父节点的removeChild方法传入子节点的引用做删除</span></span><br><span class="line">node.<span class="title function_">remove</span>() <span class="comment">// 直接调用节点的remove做删除</span></span><br></pre></td></tr></table></figure></li>
</ol>
</li>
<li><p>常用的BOM如网址、端口号、path、ip、port，以及UA信息等从何处取得</p>
<ol>
<li><p>网址、端口号、path、port和host都在location上<br><img src="https://gitee.com/assd12138/cdnpics/raw/master/img/image-20210815211715528.png" alt="image-20210815211715528"></p>
</li>
<li><p>UA信息</p>
<p>从navigator.userAgent中取出<img src="https://gitee.com/assd12138/cdnpics/raw/master/img/20210815213854.png"></p>
</li>
</ol>
</li>
<li><p>添加事件有哪些方法，addEventListener的几个参数是什么意思，双击的事件名是什么</p>
<ol>
<li>html行内添加事件处理程序</li>
<li>获取DOM元素的引用后修改其onClick的成员为事件处理函数</li>
<li>获取DOM元素的引用后调用<code>addEventListener(&#39;click&#39;,handler,isCapture)</code>添加事件处理函数，是否捕获默认为否</li>
<li>IE中使用<code>attachEvent(&#39;onclick&#39;,handler)</code>添加事件处理函数</li>
<li>双击的事件名为<code>dblclick</code></li>
</ol>
</li>
</ul>
<h2 id="结束"><a href="#结束" class="headerlink" title="结束"></a>结束</h2><blockquote>
<p>需求分析和原型设计略</p>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="post-tags">
              <a href="/page/tags/%E7%AC%94%E8%AF%95%E9%A2%98/" rel="tag"># 笔试题</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/page/2021/07/16/MDN%E4%B8%8A%E7%9A%84%E5%9C%A8%E7%BA%BF%E8%BF%90%E8%A1%8C%E6%98%AF%E6%80%8E%E4%B9%88%E5%81%9A%E7%9A%84%EF%BC%88%E4%BB%85%E9%99%90html-css%EF%BC%89/" rel="prev" title="MDN上的在线运行是怎么做的（仅限html+css）">
                  <i class="fa fa-chevron-left"></i> MDN上的在线运行是怎么做的（仅限html+css）
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/page/2021/09/17/%E5%9B%BE%E8%A1%A8%E7%B1%BB%E5%9E%8B%E7%9A%84%E9%A1%B5%E9%9D%A2%E6%87%92%E5%8A%A0%E8%BD%BD/" rel="next" title="图表类型的页面懒加载">
                  图表类型的页面懒加载 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments utterances-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">爱爱爱呵风他</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <script size="300" alpha="0.6" zIndex="-1" src="https://cdn.jsdelivr.net/npm/ribbon.js@1.0.2/dist/ribbon.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/page/js/comments.js"></script><script src="/page/js/utils.js"></script><script src="/page/js/motion.js"></script><script src="/page/js/next-boot.js"></script>

  
<script src="https://cdn.jsdelivr.net/npm/hexo-generator-searchdb@1.4.0/dist/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="/page/js/third-party/search/local-search.js"></script>





  




<script class="next-config" data-name="utterances" type="application/json">{"enable":true,"repo":"assd12138/utterancesComment","issue_term":"pathname","theme":"preferred-color-scheme"}</script>
<script src="/page/js/third-party/comments/utterances.js"></script>

</body>
</html>
